{% extends "devhub/base.html" %}

{% set title = _('Edit Product Page') %}

{% block title %}
{{ dev_page_title(title, addon) }}
{% endblock %}

{% macro empty_unless(truthy) %}
    {% if truthy %}
        {{ caller() }}
    {% else %}
        <span class="empty">{{ _('None') }}</span>
    {% endif %}
{% endmacro %}


{% block content %}
<header>
  {{ l10n_menu(addon.default_locale) }}
  <h2>{{ addon.name }}</h2>
</header>

<section class="primary" role="main">
<div id="edit-addon" class="devhub-form">
  {% if header_preview %}
    <h3>
      {{ _('Preview') }}
    </h3>
    <div class="edit-addon-section">
      <img src="{{ header_preview.image_url }}" title="{{ _('Preview of listed version') }}"
            alt="[{{ _('Preview still being generated - come back later or refresh the page.') }}]">
    </div>
  {% endif %}

  <div class="edit-addon-section" id="edit-addon-describe">
    {% include 'devhub/addons/edit/describe.html' %}
  </div>

  {% if show_listed_fields and addon.type != amo.ADDON_STATICTHEME and addon.status != amo.STATUS_DISABLED %}
    <div class="edit-addon-section" id="edit-addon-media"
         data-checkurl="{{ url('devhub.ajax.image.status', addon.slug) }}">
      {% include 'devhub/addons/edit/media.html' %}
    </div>
  {% endif %}

  <div class="edit-addon-section" id="edit-addon-details">
    {% include 'devhub/addons/edit/additional_details.html' %}
  </div>

  <div class="edit-addon-section" id="edit-addon-technical">
    {% include 'devhub/addons/edit/technical.html' %}
  </div>

</div>
</section>

{% include 'devhub/includes/addons_edit_nav.html' %}

{% endblock %}
